package cn.njxzc.ppt;

class Spot {
	private int x, y;

	Spot(int u, int v) {
		setX(u);
		setY(v);
	}

	void setX(int x1) {
		x = x1;
	}

	void setY(int y1) {
		y = y1;
	}

	int getX() {
		return x;
	}

	int getY() {
		return y;
	}

	void move(int h, int k) {
		x = x + h;
		y = y + k;
	}
}

/***
 * @Program Name : JavaProgram.ppt.Jex6_10.java
 * @Written by : Roy Xu
 * @Creation Date : 2016��4��5�� ����8:22:18
 * @version : v1.00
 * @Description :
 * @ModificationHistory Who When What -------- ----------
 *                      ------------------------------------------------ Roy Xu
 *                      2016��4��5������8:22:18 TODO
 ***/
public class Jex6_10 {
	public static void main(String args[]) {

		Spot s = new Spot(2, 3);
		System.out.println("s������:" + s.getX() + "," + s.getY());
		s.move(4, 5);
		System.out.println("s������:" + s.getX() + "," + s.getY());
	}

}
